home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / btfl144.zip / BTFILER.DOC < prev    next >
Text File  |  1992-11-27  |  76KB  |  1,909 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                     BTFILER
  10.  
  11.  
  12.                 A Btrieve file recovery, viewing and editing utility
  13.                                   Version 1.42
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                                         By
  34.  
  35.                               Access Microsystems Inc.
  36.                                 404 Midstreams Road
  37.                                Brick, NJ  08724-3838
  38.  
  39.                                   (908) 892-2683
  40.                                   CIS: 74040,607
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                                  TABLE OF CONTENTS
  47.  
  48.      1.  Who made BTFILER?  Why?
  49.  
  50.      2.  What does BTFILER require?
  51.  
  52.      3.  What does BTFILER do?
  53.  
  54.         A. Intended actions
  55.         B. Unintended actions (dare we say BUGS?)
  56.  
  57.      4.  Details...
  58.  
  59.         A. Starting BTFILER
  60.         B. The Main Menu
  61.         C. The File Sub-menu
  62.  
  63.                 1. Browsing/Editing a BTRIEVE file
  64.  
  65.                         a. Moving around
  66.                         b. Editing a record
  67.                         c. Deleting a record
  68.                         d. Adding a record
  69.                         e. The File sub-menu in the Browse/Edit
  70.                               main menu
  71.                         f. The View sub-menu in the Browse/Edit
  72.                               main menu
  73.                         g. Special problems re: variable length
  74.                               records
  75.  
  76.                 2. Cloning a Btrieve file
  77.                 3. Packing a Btrieve file
  78.                 4. Copying a Btrieve file
  79.                 5. Test/Rebuild a Btrieve file
  80.  
  81.                         a. DOS Read test
  82.                         b. Index test
  83.                         c. Rebuild
  84.                         d. Advanced File Recovery
  85.  
  86.                            1. Recover EVERY POSSIBLE Record
  87.                            2. Rebuild Header
  88.  
  89.                 6. Import/Export
  90.  
  91.                         a. Import
  92.                            1. Unformatted ASCII
  93.                            2. Comma-Delimited ASCII
  94.  
  95.                         b. Export
  96.                            1. Unformatted ASCII
  97.                            2. Comma-Delimited ASCII
  98.  
  99.                 7. Misc. Btrieve Functions
  100.  
  101.                         a. Set Owner
  102.                         b. Clear Owner
  103.                         c. Statistics
  104.                         d. Btrieve Version
  105.                         e. Create file from BTB file
  106.                         f. Supplemental Index
  107.                         g. Transactions
  108.  
  109.                 8. Exiting BTFILER
  110.  
  111.         D. The Options Sub-menu
  112.  
  113.                 1. Set Colors
  114.                 2. Set Misc. Parameters
  115.                 3. Reset Btrieve
  116.                 4. REGISTER BTFILER
  117.  
  118.         E. The Help Sub-menu
  119.  
  120.                 1. List Error Codes
  121.                 2. List Operation Codes
  122.                 3. Btrieve Page Size Calculator
  123.                 4. About BTFILER
  124.  
  125. 5.  Getting help/making suggestions/future directions
  126.  
  127.  
  128.  
  129. 1.  Who made BTFILER?  Why?
  130.  
  131.      BTFILER is a product of Access Microsystems Inc.  We do
  132.      programming in C and C++ under DOS and UNIX, often
  133.      using Btrieve as a file manager.  (If you have a
  134.      project we might be able to help with, contact us at
  135.      the phone or Compuserve number on the first page of the
  136.      documentation or throughout the software.)
  137.  
  138.      We have used several programs for looking at,
  139.      recovering data from, and editing Btrieve files.  We
  140.      have been disappointed by the results.  Some crashed,
  141.      others worked but punished us in the process.  We
  142.      thought that there must be a better way, and set out to
  143.      design such a product.  BTFILER is not quite that
  144.      product, but what we hope will be the first step in the
  145.      creation of a line of software for Btrieve users.  We
  146.      have ideas about automating the Btrieve file creation
  147.      process, allowing the import and export of comma
  148.      delimited files, as well as allowing editing in a user
  149.      friendly way (for instance, dates in mm/dd/yy format,
  150.      binary and packed information in ASCII form, etc.)
  151.  
  152.      We can't do all that just now, and so we made what we
  153.      consider a good first step.  If you become a registered
  154.      user, you can help us mold future products and future
  155.      updates to BTFILER.  Shareware works as a way to ensure
  156.      that you can try software before you buy only if you
  157.      support shareware authors.  If BTFILER meets a need,
  158.      please register!  Also, think about the possibility of
  159.      getting a distribution license and making BTFILER part
  160.      of your Btrieve application.
  161.  
  162.      DISCLAIMER - AGREEMENT
  163.  
  164.      Users of BTFILER must accept this disclaimer of
  165.      warranty:
  166.  
  167.      "BTFILER is supplied as is.  The author disclaims all
  168.      warranties, expressed or implied, including, without
  169.      limitation, the warranties of merchantability and of
  170.      fitness for any purpose. The author assumes no
  171.      liability for damages, direct or consequential, which
  172.      may result from the use of BTFILER."
  173.  
  174.      For Non-Registered Users:
  175.  
  176.      BTFILER is a "shareware program" and is provided at no
  177.      charge to the user for evaluation.  Feel free to share
  178.      it with your friends, but please do not give it away
  179.      altered or as part of another system.  The essence of
  180.      "user-supported" software is to provide personal
  181.      computer users with quality software without
  182.      high prices, and yet to provide incentive for
  183.      programmers to continue to develop new products.  If
  184.      you find this program useful and find that you are
  185.      using BTFILER and continue to use BTFILER after a
  186.      reasonable trial period, you must make a registration
  187.      payment of $29.00 (+4.00 S&H) to Access Microsystems Inc.
  188.      The $29.00 registration fee will license one copy for use
  189.      on any one computer at any one time.  You must treat
  190.      this software just like a book.  An example is that this
  191.      software may be used by any number of people and may be
  192.      freely moved from one computer location to another, so
  193.      long as there is no possibility of it being used at one
  194.      location while it's being used at another.  Just as a
  195.      book cannot be read by two different persons at the same
  196.      time, a single copy of BTFILER cannot be used in two places
  197.      at once, unless the license is being violated.
  198.  
  199.      Commercial users of BTFILER must register and pay for
  200.      their copies of BTFILER within 30 days of first use or
  201.      their license is withdrawn.  Site-License arrangements
  202.      may be made by contacting Access Microsystems Inc. or
  203.      by filling out the registration form found in
  204.      REGISTER.DOC or produced by BTFILER.  See the
  205.      Options/Register BTFILER menu option.
  206.  
  207.      You are encouraged to pass a copy of BTFILER along to
  208.      your friends for evaluation.  Please encourage them to
  209.      register their copy if they find that they can use it.
  210.      All registered users will receive:
  211.  
  212.           A copy of the latest version of the BTFILER
  213.              system.
  214.           A printed manual.
  215.           Notice of future upgrades.
  216.           Information on future products.
  217.           Support for a MINIMUM of 90 days.
  218.           A copy of our BU partial BUTIL replacement
  219.              program.  This program STOPs, RESETs Btrieve,
  220.              shows BTRIEVE version and CLONEs Btrieve files.
  221.              You may distribute this freely.
  222.  
  223.  
  224. 2.  What does BTFILER require?
  225.  
  226.         BTFILER requires:
  227.  
  228.           An IBM PC or compatible with 512 K (640K
  229.           recommended for large variable length records).
  230.  
  231.           MS/PC DOS version 2.0 or better.  Version 4.00 is
  232.           a known problem, so if you have a problem and you
  233.           have version 4.00 of MS/PC DOS, UPGRADE DOS FIRST!
  234.  
  235.           Btrieve version 4.0 or better.  Make sure to
  236.           tailor your Btrieve start-up parameters (See "Set
  237.           Misc. Parameters" in the File Sub-menu).
  238.  
  239.                 BTFILER also requires and is shipped with the
  240.                    following files:
  241.  
  242.                         BTFILER.DOC    This file
  243.  
  244.                         BTFILER.BER    A file with Btrieve Error
  245.                                           codes listed
  246.  
  247.                         BTFILER.BOP    A file with Btrieve Operation
  248.                                           codes
  249.  
  250.                         BTFILER.MNU    A Menu Control File
  251.  
  252.                         BTFILER.HLP    A Help file.
  253.  
  254.                         BTFILER.MSK    Formatting information -
  255.                                           PROPRIETARY FORMAT!
  256.  
  257.                         BTFILER.CF1    A configuration file
  258.  
  259.                         BTFILER.EXE    The executable file.  Run this
  260.                                        to use BTFILER.
  261.  
  262.                         REGISTER.DOC   A file with a BTFILER registration
  263.                                           form.  (Registration can be
  264.                                           printed by the program itself
  265.                                           as well.)
  266.  
  267.                         SAMPLE.BTB  A sample BTrieve Build file.  An ASCII
  268.                                           file used to describe a Btrieve
  269.                                           file to be created.
  270.  
  271.                         AMIMAP.EXE     A BONUS utility program that
  272.                                           lists the amount of memory
  273.                                           taken up by resident
  274.                                           programs like Btrieve
  275.  
  276.                         SAMPLE.BTB     A sample BTrieve Build ASCII
  277.                                           file, used to create Btrieve
  278.                                           Files (File/Misc. Btrieve
  279.                                           Functions/Create file from BTB).
  280.  
  281.                         SAMPLE.BTS     A sample BTrieve Supplemental
  282.                                           index ASCII file, used to
  283.                                           create a Supplemental Index.
  284.  
  285.                         POL.DAT        A sample data file with
  286.                                           string, and decimal
  287.                                           fields to test
  288.                                           comma-delimited import
  289.                                           and export.
  290.  
  291.                         POL.INX        A sample .INX file for
  292.                                           Comma-delimited import
  293.                                           and export.  Also
  294.                                           presented in Appendix C
  295.  
  296.  
  297.                         POL.ASC        An example of the output
  298.                                           created by using
  299.                                           POL.INX to export data
  300.                                           from POL.DAT
  301.  
  302.                         POL.DOC        A file layout for POL.DAT
  303.  
  304.                         BTCLONE.BAT    An example of a batch file that
  305.                                           takes parameters and builds a
  306.                                           keystroke file that is used to
  307.                                           automate a BTFILER operation,
  308.                                           in this case, CLONE.
  309.  
  310.                         BTRESET.BAT    An example of a batch file
  311.                                           that creates a keystroke
  312.                                           file to automate a simple BTFILER
  313.                                           operation, in this case, reset.
  314.                                           For further details on both
  315.                                           batch files, see Appendix B.
  316.  
  317.                        REGISTER.DOC  A file containing a
  318.                                           registration form.
  319.  
  320.                        CINSTALL.DAT   A Color configuration file.
  321.                            This file contains a single line of text.
  322.                            The line has 7 sets of 3 digit numbers, each
  323.                            3 digit number representing one of the types
  324.                            of colors used by BTFILER.  THIS FILE
  325.                            SHOULD BE PLACED IN A DIRECTORY THAT IS
  326.                            ON YOUR DOS PATH SO THAT YOU WILL ALWAYS
  327.                            READ THE SAME COLOR FILE!  The file should
  328.                            look like this:
  329.  
  330.                                 rrrmmmooodddsssbbbnnn
  331.  
  332.                                 Where:
  333.  
  334.                                 rrr=decimal "regular" color.
  335.                                 mmm=decimal "menu" color.
  336.                                 ooo=decimal "selected menu option"
  337.                                             color.
  338.                                 ddd=decimal "active data entry field"
  339.                                             color.
  340.                                 aaa=decimal "status line" color.
  341.                                 bbb=decimal "box" color.
  342.                                 nnn="Hot" letter in menu option
  343.  
  344.                 BTFILER may, from time to time, create the
  345.                 following files:
  346.  
  347.                        BTFILER.CF2    A second configuration file.
  348.  
  349.                        TMP?????.$$$   Temporary files created to
  350.                        save the state of the screen, etc. These may
  351.                        be deleted if you are SURE that no copy of
  352.                        BTFILER is running on the system or on a
  353.                        network the system is connected to.
  354.  
  355.  
  356. 3.  What does BTFILER do?
  357.  
  358.         A. Intended actions
  359.  
  360.           BTFILER allows you to TEST and RECOVER data from
  361.           Btrieve files.  In addition to standard sorts of
  362.           Btrieve testing (Test for consistent prev/next
  363.           links, etc.) BTFILER also has a DOS File test
  364.           which reads the entire file and reports if a DOS
  365.           Critical error (ABORT, RETRY or FAIL) error
  366.           occurs.  You may also rebuild a damaged Btrieve
  367.           file header, and if really desperate, use our Recover
  368.           EVERY POSSIBLE Record recovery method, which
  369.           painfully tries to get every possible record
  370.           in the file by guessing where the data might be.
  371.  
  372.           BTFILER allows you to view, edit, search and
  373.           delete records in a Btrieve file.
  374.  
  375.           BTFILER allows you to Clone a Btrieve file (That
  376.           is, create an empty Btrieve file with the same key
  377.           structure and record size as the original).
  378.  
  379.           BTFILER allows you to Pack a Btrieve file (That
  380.           is, create a copy of a Btrieve file less the space
  381.           left by deleted records) as well as Copy a file (That
  382.           is, copy records from one Btrieve fiole to another,
  383.           with the destination file possibly having a different
  384.           record length and key structure).
  385.  
  386.           BTFILER allows you to Import and Export records in
  387.           an Unformatted ASCII format, a format like BUTIL,
  388.           Novell's Btrieve Developer's Utility, or NEW with
  389.           version 1.40, comma-delimited ASCII!
  390.  
  391.           BTFILER allows you to create a Btrieve file with a
  392.           BTrieve Build file (.BTB) file and create a
  393.           supplemental index using a BTrieve Supplemental
  394.           (.BTS) file.  You may also DROP a supplemental
  395.           index.
  396.  
  397.           BTFILER allows you to begin and end transactions
  398.           within a single session, and will prompt you to
  399.           end the transaction if you try to do something
  400.           that can't be done in a transaction.
  401.  
  402.           BTFILER allows you to repeat repetitive tasks by
  403.           creating keystroke files that get passed back to
  404.           the keyboard buffer as the program is run.  This
  405.           also allows more technical users to provide easy
  406.           to use batch files for those less comfortable
  407.           operating BTFILER directly.  (See Appendix B).
  408.  
  409.           BTFILER allows you to Set and Clear owners of
  410.           Btrieve files, displays Btrieve version
  411.           information, and shows file statistics and key
  412.           structure.
  413.  
  414.           BTFILER lists Btrieve Error codes (arranged
  415.           numerically) and Operation codes (arranged
  416.           alphabetically).  You may also get details on
  417.           Btrieve error codes.
  418.  
  419.           BTFILER lets you choose from 4 different color
  420.           sets, or customize colors.
  421.  
  422.         B. Unintended actions (dare we say BUGS?)
  423.  
  424.           As of this writing date, there are no known bugs.
  425.           (Kind of reminds us of the compiler that reports,
  426.           after a successful compile, "None of the errors
  427.           were found").
  428.  
  429.           It is likely that VERY large variable length
  430.           records will cause problems with memory (but we
  431.           have not tested it with very large (>25K) variable
  432.           length records).  Please let us know if you run
  433.           across any problems.  See section 5, Getting
  434.           help/making suggestions.
  435.  
  436. 4.  Details...
  437.  
  438.      In the following sections, we detail actions required
  439.      to make BTFILER do work for you.  This assumes you have
  440.      placed the files mentioned above (What does BTFILER
  441.      require?) in your "PATH".
  442.  
  443.      For instance, if you type in PATH<Press ENTER> from the
  444.      DOS prompt (commonly "C:\>>") and you see the
  445.      following:
  446.  
  447.                 PATH=C:\;C:\DOS;C:\UTIL
  448.  
  449.      you should place the BTFILER file in the C:\, C:\DOS or
  450.      the C:\UTIL directory.  You must also have Btrieve
  451.      loaded, or if so configured, Btrieve or Brequest must
  452.      be available on the PATH.
  453.  
  454.         A. Starting BTFILER
  455.  
  456.           At any DOS prompt (or from the directory that
  457.           BTFILER files reside in, if not on your PATH)
  458.           type:
  459.  
  460.                 BTFILER<Press ENTER>
  461.  
  462.           If you wish to browse or edit a particular Btrieve
  463.           file, you may enter that on the command line as
  464.           well. For example:
  465.  
  466.                 BTFILER filename.ext<Press ENTER>
  467.  
  468.           BTFILER will then take a few seconds to load.
  469.           Depending upon the settings on the "Set Misc.
  470.           Parameters" screen (under the "Options" menu)
  471.           BTFILER may also load Btrieve or Brequest.  If you
  472.           get a message indicating that BTFILER is unable to
  473.           load Btrieve, load Btrieve from the command line
  474.           and then go to the "Set Misc. Parameters" screen
  475.           and ensure that the default Btrieve start up
  476.           parameters are set correctly.
  477.  
  478.           Three other command line parameters are possible.
  479.           /k:keyfile, where keyfile is the name of a file
  480.           with keystrokes for BTFILER to use on start-up.
  481.           See Appendix B for details on creation of a
  482.           keystroke file.  /c:myfile.cf2 where myfile.cf2 is
  483.           a version of the BTFILER.CF2 configuration file
  484.           created under Options/Set Misc. Parameters.  If
  485.           you need to, you can create 2 or more
  486.           configuration files, and with the /c command line
  487.           parameter, indicate which should be loaded.
  488.           An additional parameter /L tells BTFILER to create a
  489.           log file of test/recovery activity called BTFILER.LOG.
  490.           You may also specify a filename and extension for the
  491.           logfile by passing a parameter /L:filename.ext.  All
  492.           messages indicating no problem contain the letters OK,
  493.           all messages indicating some failure contain the
  494.           letters FAIL.
  495.  
  496.           As BTFILER is loaded a screen will appear briefly
  497.           to list the registered owner of this copy of
  498.           BTFILER (Thank You!) or to remind you that you are
  499.           currently using an unregistered copy.  This screen
  500.           will remain on the screen for a few seconds, and
  501.           then you may press any key to continue.  Note that
  502.           the status line (the bottom line on the screen)
  503.           will almost always tell you what BTFILER is doing
  504.           or what you should do next.
  505.  
  506.         B. The Main Menu
  507.  
  508.           The Main Menu is a menu bar running across the top
  509.           of the screen.  This menu has three options:
  510.           File, Options, and Help.
  511.  
  512.           You can maneuver around the menu by using arrow
  513.           keys and the ENTER key, as well as ALT-Letter
  514.           combinations. (For instance, if no sub-menu is
  515.           "dropped," you may press the ALT and the H key to
  516.           get to the Help sub-menu.
  517.  
  518.           To exit BTFILER, you can press ESC (or press ESC
  519.           twice if a sub-menu is "dropped") and you will
  520.           return to DOS. You may also exit by pressing ENTER
  521.           while the Exit option of the File sub-menu is
  522.           highlighted.
  523.  
  524.         C. The File Sub-menu
  525.  
  526.           The File sub-menu includes four options:
  527.           Browse/Edit Btrieve File, Clone Btrieve File, Pack
  528.           Btrieve File,and Exit.
  529.  
  530.           1. Browsing/Editing a BTRIEVE file
  531.  
  532.                When ENTER is pressed (or ALT-B is pressed)
  533.                in the File sub-menu, you will be prompted to
  534.                enter a file name.  The default is "*.DAT"
  535.                If you supplied a file name on the command
  536.                line when starting BTFILER, or if you have
  537.                already browsed/edited a Btrieve file, that
  538.                will be the default.  If you press ENTER with
  539.                a filename containing '?' or '*' (an
  540.                "ambiguous" file name) BTFILER will present
  541.                you with a menu of files like the file name
  542.                entered.  If the menu is presented, use the
  543.                arrow keys to get to the correct file and
  544.                press ENTER.  You may also press ESC and re-
  545.                enter the file name.  If you press ESC while
  546.                entering the file name, you will return to
  547.                the menu.
  548.  
  549.                Once the Btrieve file selected is opened and
  550.                some of the records are loaded, you will be
  551.                presented with a screen with three parts:
  552.  
  553.                 The Browse/Edit Main Menu bar
  554.                 The Scale
  555.                 The Data area.
  556.  
  557.                The Browse/Edit Main Menu bar works very much
  558.                like the main menu described earlier.  One
  559.                difference is that the menu here is not the
  560.                focus of activity. When you start
  561.                browsing/editing a file, no options on the
  562.                Browse/Edit Main Menu are highlighted.  The
  563.                focus is on the data below.  To get to the
  564.                Browse/Edit Main Menu, simply press ALT and F
  565.                (to get to the File sub-menu) or ALT and V
  566.                (to get to the View sub-menu).
  567.  
  568.                The Scale lets you know what offset within
  569.                the record you are looking at.  The right and
  570.                left arrows will move you 10 positions to the
  571.                left or right.
  572.  
  573.                The Data area of the screen is a straight
  574.                listing of the data in the records in the
  575.                file.  Note that there may be some strange
  576.                characters on the screen.  This is perfectly
  577.                normal if the Btrieve file contains binary or
  578.                packed data.
  579.  
  580.                   a. Moving around
  581.  
  582.                     Use the arrow keys and the Page-up and
  583.                     Page-down keys to move around.  When you
  584.                     enter the screen, the top line will be
  585.                     highlighted.  Use the down arrow to
  586.                     highlight another record, and use the
  587.                     left and right arrows to view the rest
  588.                     of a record that is larger than 80
  589.                     characters.
  590.  
  591.                   b. Editing a record
  592.  
  593.                     To edit a Btrieve record, use the arrow
  594.                     keys to highlight the record you wish to
  595.                     edit and press ENTER.  You will be
  596.                     presented with a menu asking if you want
  597.                     to Edit this record, Delete this record,
  598.                     Add a record like this one, or Continue
  599.                     Browsing. With Edit this record
  600.                     highlighted, press ENTER.
  601.  
  602.                     You will be presented with a window on
  603.                     the screen that will allow you to edit,
  604.                     256 characters at a time, the record
  605.                     that was selected.  By default you will
  606.                     be doing a HEX edit.  To switch back and
  607.                     forth between HEX and ASCII editing,
  608.                     press the TAB key.  Use the cursor
  609.                     movement keys to move around the data.
  610.  
  611.                     To exit the editing screen, press ESC.
  612.                     If you make changes, a Yes or No box
  613.                     will appear reminding you that the data
  614.                     was changed, and asking if you wish to
  615.                     save changes.  Press 'Y' to save
  616.                     changes, or 'N' to abandon.  It is
  617.                     possible to make changes that Btrieve
  618.                     won't allow (creating a duplicate record
  619.                     in a key that does not allow duplicates
  620.                     or trying to modify a non-modifiable
  621.                     key) and if you do that you will get an
  622.                     error message.
  623.  
  624.                   c. Deleting a record
  625.  
  626.                     To delete a Btrieve record, use the
  627.                     arrow keys to highlight the record you
  628.                     wish to delete and press ENTER.  You
  629.                     will be presented with a menu asking if
  630.                     you want to Edit this record, Delete
  631.                     this record, Add a record like this one
  632.                     or Continue Browsing.  With Delete this
  633.                     record highlighted, press ENTER.
  634.  
  635.                     You will be asked if you are sure you
  636.                     want to delete the record.  Press 'Y' to
  637.                     delete it, or 'N' to not delete the
  638.                     record
  639.  
  640.                   d. Adding a record like the current record
  641.  
  642.                     To add a Btrieve like the record you are
  643.                     currently editing (using an existing record as
  644.                     a model ), use the arrow keys to highlight the
  645.                     record most like the one you wish to add and
  646.                     press ENTER. You will be presented with a
  647.                     menu asking if you want to Edit this record,
  648.                     Delete this record, Add a record like this
  649.                     record, or Continue Browsing.  With Add
  650.                     a record like this record highlighted,
  651.                     press ENTER.
  652.  
  653.                     You will be presented with a screen very
  654.                     much like the editing screen.  Make
  655.                     whatever changes you wish.  When you are
  656.                     done, press ESC.  You then will be asked
  657.                     if you wish to save the changes.  Press
  658.                     'Y' to save the new record, or 'N' to
  659.                     abandon the changes.  It is possible to
  660.                     try to add a new record that Btrieve
  661.                     won't allow (creating a duplicate record
  662.                     in a key that does not allow duplicates)
  663.                     and if you do that you will get an error
  664.                     message.
  665.  
  666.                   e. The File sub-menu in the Browse/Edit main menu
  667.  
  668.                     This menu allows you to select a new
  669.                     file or exit to the Main Menu.  To get
  670.                     to the Files sub-menu in the Browse/Edit
  671.                     main menu while browsing data, press the
  672.                     ALT and F keys.
  673.  
  674.                   f. The View sub-menu in the Browse/Edit main menu
  675.  
  676.                     To get to the View sub-menu in the
  677.                     Browse/Edit main menu while browsing
  678.                     data,press the ALT and V keys.  The View
  679.                     sub-menu in the Browse/Edit main menu
  680.                     has four options:  Key Only, Set Key
  681.                     Number, Begin View With, and Search.
  682.  
  683.                     Key Only allows you to switch from
  684.                     viewing the entire record to a key only
  685.                     browse.  To use the check-box, press the
  686.                     space bar and a check mark will appear
  687.                     and disappear.  If the check mark
  688.                     appears when ENTER is pressed, only the
  689.                     key will be displayed.
  690.  
  691.                     Set Key Number allows you to set the
  692.                     order you wish to view the data.  The
  693.                     field where you enter the key number
  694.                     will default to the current key number.
  695.  
  696.                     Begin View With allows you to jump to a
  697.                     particular key value in the file.
  698.  
  699.                     Search allows you to search out a record
  700.                     in the file looking for a particular
  701.                     string of text.  The search can be
  702.                     global or starting from the top line on
  703.                     the screen, and it can be case sensitive
  704.                     or insensitive to the case of the
  705.                     characters entered (upper an lowercase
  706.                     treated the same).  If the string is
  707.                     found, the first record with the string
  708.                     will be displayed with the matching text
  709.                     flashing.
  710.  
  711.                   g. Special problems with Variable length records.
  712.  
  713.                     Variable length records present a
  714.                     special problem when building a generic
  715.                     Btrieve file viewer.  The only limit to
  716.                     the size of a Btrieve variable length
  717.                     record is 64K.  Most Variable length
  718.                     records are MUCH shorter.  If you work
  719.                     with variable length records, please
  720.                     make sure you set your "Largest variable
  721.                     record" under "Set Misc. Parameters"
  722.                     under "Options" on the Main Menu to a
  723.                     value bigger than any record you might
  724.                     expect to read in
  725.  
  726.                     If you edit a variable length record, it
  727.                     will be written back at the same length.
  728.  
  729.           2. Cloning a Btrieve file
  730.  
  731.                With this option, you can make an empty copy
  732.                of an existing Btrieve file.  You must enter
  733.                the name of the Btrieve file as well as the
  734.                name of the "clone" file to be created.
  735.  
  736.           3. Packing a Btrieve file
  737.  
  738.                Like most DOS files, Btrieve files get bigger
  739.                as records are added, but do not shrink as
  740.                records are deleted.  This can be especially
  741.                noticeable if you have a transaction file
  742.                that grows and grows until some month or year
  743.                end procedure, and then is purged.  The space
  744.                where the deleted records were is still in
  745.                the file.  This space will eventually be used
  746.                again, but what if you can't wait?
  747.  
  748.                That is where Packing comes in.  Simply
  749.                supply the name of the file to be packed, and
  750.                BTFILER will rewrite it without the space
  751.                where the deleted records were.  The original
  752.                file is saved with an extension of .BAK.
  753.                Please ensure that the packed file is good
  754.                and then you may delete the .BAK.
  755.  
  756.           4. Copying a Btrieve file
  757.  
  758.                This operation allows you to copy data from one
  759.                btrieve file to another, possibly with different
  760.                key structure and record length.
  761.  
  762.  
  763.           5. Test/Rebuild a Btrieve file
  764.  
  765.                This menu allows you to test a Btrieve file
  766.                to ensure that DOS can read the entire file
  767.                without a DOS Critical error (Abort, Retry,
  768.                Fail...), tests that all indices (keys) of a
  769.                Btrieve file are correctly linked, and allows
  770.                you to rebuild a damaged file.  The
  771.                explanations for these options follows.
  772.  
  773.                   a. DOS Read Test
  774.  
  775.                     This option allows you to test a file to
  776.                     ensure that DOS can read through the
  777.                     entire file.  The file in question need
  778.                     not even be a Btrieve file.
  779.  
  780.                   b. Index Testing
  781.  
  782.                     This option tests a Btrieve file to
  783.                     ensure that the links in the file (in
  784.                     both directions for each key) are
  785.                     correct.  A record could be written to
  786.                     disk in such a way that it points to
  787.                     itself, or to some other record that is
  788.                     not the correct record.  This test will
  789.                     look for such problems.
  790.  
  791.                   c. Rebuild
  792.  
  793.                     If you don't normally read
  794.                     documentation, PLEASE READ THIS!  This
  795.                     is a "last resort" procedure that should
  796.                     be used only if no recent backup exists.
  797.                     While there is little chance of damage
  798.                     occurring to your Btrieve file since the
  799.                     original is opened in read-only mode,
  800.                     and the original is saved as a .BAK
  801.                     file, backups are the best bet!  There
  802.                     is no guarantee that this procedure will
  803.                     get all records, although it is likely
  804.                     that almost all records will be
  805.                     recovered.
  806.  
  807.                     This procedure uses physical positioning
  808.                     (not logical positioning, going through
  809.                     the file via a key) to read from the
  810.                     first physical record to the last.  If
  811.                     an error occurs while proceeding from
  812.                     beginning to end, the program tries to
  813.                     step directly to the last record, and
  814.                     tries to read from end to beginning.  If
  815.                     there is only one record that has a
  816.                     problem, all but that one record should
  817.                     be recovered.
  818.  
  819.                   d. Advanced File Recovery
  820.  
  821.                      1. FULL Rebuild
  822.  
  823.                        If you don't normally read
  824.                        documentation, PLEASE READ THIS!  This
  825.                        is a "REALLY last resort" procedure that
  826.                        should be used only if no recent backup
  827.                        exists.  While there is little chance of
  828.                        damage occurring to your Btrieve file since
  829.                        the original is opened in read-only mode,
  830.                        and the original is saved as a .BAK
  831.                        file, backups are the best bet!  There
  832.                        is no guarantee that this procedure will
  833.                        get all records, although it is likely
  834.                        that almost all records will be
  835.                        recovered.  In addition, this procedure may
  836.                        recover EXTRA records, probably index
  837.                        information that is mis-read as data.  NOTE:
  838.                        This procedure will not work on files with
  839.                        data compression, nor will it work on key
  840.                        only files!  If you are not using Btrieve/Brequest
  841.                        version 5.1x, this may or may not work.
  842.                        ALWAYS keep a backup of the damaged file to
  843.                        try something else if this fails.
  844.  
  845.                        This procedure uses our knowledge of Btrieve
  846.                        files to try to find records at EVERY
  847.                        POSSIBLE record location in the file, and
  848.                        then goes a step further:  If a status other
  849.                        than Status 43 (invalid positioning
  850.                        information) it will attempt to read the
  851.                        portion of the file where we think there
  852.                        might be a record via standard DOS calls.
  853.                        Not for the squeemish, and you will have to
  854.                        look through the file to find any records
  855.                        that are not real data.  Try after all else
  856.                        fails.  What have you got to lose?  If this
  857.                        doesn't find your data, they aren't there!
  858.  
  859.                     e. Header Rebuild
  860.  
  861.                        This operation should ALWAYS be tried only
  862.                        on a copy of the damaged file, so that you
  863.                        may still try ther recovery options if this
  864.                        operation fails.  You MUST have another file
  865.                        that is identical in key structure and page
  866.                        size and record length to perform this
  867.                        operation.  This operation will copy the
  868.                        header from the undamaged file, modify some
  869.                        values in the file to ensure that the header
  870.                        will reflect the current file length of the
  871.                        damaged file, and then will place you in the
  872.                        file rebuild screen (described above) and
  873.                        attempt to recover all records.
  874.  
  875.          6. Import/Export
  876.  
  877.                Select Import/Export from the File menu under
  878.                the Main Menu and you will be presented with
  879.                a menu that allows you to import or export
  880.                records to or from a Btrieve file.  Upon
  881.                selecting Import or Export. you will be
  882.                presented with a menu that allows you to import
  883.                or export Unformatted ASCII (BUTIL format or flat
  884.                unformatted ASCII).  You will then be
  885.                presented with a screen that allows you to
  886.                specify the Source and Destination file.  In the
  887.                case of Comma-delimited ASCII, you will also have
  888.                to specify a description file in a format like
  889.                POL.INX, included on disk as well as in Appendix
  890.                C of this manual.
  891.  
  892.                If you choose Unformatted ASCII, you will also be
  893.                allowed to choose between a BUTIL style ASCII file
  894.                or a flat ASCII file, without the length specifier
  895.                required by BUTIL.  If you choose to NOT use the
  896.                BUTIL format, the file in question should be
  897.                a fixed length record with NO binary data.
  898.                The length of the record for ASCII files not
  899.                in the BUTIL style is the number of bytes
  900.                until the ASCII CR/LF characters are found.
  901.                In a binary file, it is possible that these
  902.                characters might naturally occur, causing
  903.                BTFILER to think that the record ends in
  904.                the middle of a field of binary data.  This is
  905.                clearly not a good thing.
  906.  
  907.                The format of the BUTIL style ASCII file is
  908.                as follows:
  909.  
  910.                 29,this is a 29 character record<CR/LF>
  911.  
  912.                That is, each record should contain the
  913.                decimal length followed by a comma, followed
  914.                by the record, padded with spaces if needed
  915.                to make it the length specified, followed by
  916.                CR/LF (hex 0D0A).
  917.  
  918.                If you are not using the export file to
  919.                communicate directly with another Btrieve utility
  920.                that understands BUTIL or flat unformatted ASCII,
  921.                you are almost always better off exporting data
  922.                in the comma-delimited ASCII format.  If you have
  923.                .DDF files (files created by applications like
  924.                Xtrieve by Novell) please contact us for
  925.                information on our latest addition, BTVIEWER.
  926.                BTVIEWER allows for import and export of views
  927.                created by using .DDF files, as well as the
  928.                intellegent query of the database, with display
  929.                and editing done on a field level that allows,
  930.                for instance, dates to be edited in the form of
  931.                'mm/dd/yyyy' and decimal or binary values to be
  932.                edited as numeric ASCII values (i.e. '123.45')
  933.  
  934.  
  935.          7. Misc. Btrieve Functions
  936.  
  937.                   a. Set Owner
  938.  
  939.                     Btrieve allows users to set "owners" for
  940.                     files.  By setting an "owner," a Btrieve
  941.                     user can choose to allow no access to
  942.                     the file without the owner name or allow
  943.                     read-only access, and the user can
  944.                     choose whether the file will be
  945.                     encrypted or not.  It is important to
  946.                     remember that if you set an owner for a
  947.                     Btrieve file, any program that is to
  948.                     access it (including BTFILER) must know
  949.                     that user name, and the user must
  950.                     remember the user name if s/he wishes to
  951.                     Clear the owner (see below).
  952.  
  953.                     When the File/Misc. Btrieve
  954.                     Functions/Set Owner menu option is
  955.                     selected, BTFILER displays a box with
  956.                     three fields.  In the first field, enter
  957.                     the name of the file for which an owner
  958.                     name is to be set.  In the second field,
  959.                     enter the string that will become the
  960.                     new "owner."  In the third field you
  961.                     will be presented with a menu that will
  962.                     allow you to choose whether or not to
  963.                     allow read-only access without the owner
  964.                     name, and whether or not the Btrieve
  965.                     file should be encrypted.  Highlight the
  966.                     appropriate option and press ENTER.  If
  967.                     you have selected an option that calls
  968.                     for encryption, some time may be
  969.                     required.  Please be patient.
  970.  
  971.                   b. Clear owner
  972.  
  973.                     When the File/Misc. Btrieve
  974.                     Functions/Clear Owner menu option is
  975.                     selected, BTFILER displays a box with
  976.                     two fields.  In the first field, enter
  977.                     the name of the file for which an owner
  978.                     name is to be cleared.  In the second
  979.                     field, enter the current "owner."  If
  980.                     you have selected a Btrieve file that
  981.                     had an owner name set with encryption,
  982.                     some time may be required.  Please be
  983.                     patient.
  984.  
  985.                   c. Statistics
  986.  
  987.                     When the File/Misc. Btrieve
  988.                     Functions/Statistics menu option is
  989.                     selected, BTFILER prompts for a file
  990.                     name to be entered.  If the file name
  991.                     entered exists and is a valid Btrieve
  992.                     file, BTFILER will display information
  993.                     about the file, including the number of
  994.                     records and number of keys, the record
  995.                     length, the file length, and some
  996.                     information on the actual space used, on
  997.                     average, for each record in the file and
  998.                     the % utilization.  Information on the
  999.                     keys will appear in a box on the lower
  1000.                     portion of the screen.  If more keys
  1001.                     than will fit on one screen are present,
  1002.                     use the arrow or page down keys to see
  1003.                     the rest of the key information.
  1004.  
  1005.                   d. Btrieve Version
  1006.  
  1007.                     When the File/Misc. Btrieve
  1008.                     Functions/Btrieve Version menu option is
  1009.                     selected, BTFILER displays a small box
  1010.                     that gives Btrieve version information,
  1011.                     for instance "Btrieve Version 5.10 for
  1012.                     Networks."  Press any key to continue.
  1013.  
  1014.                   e. Create file from BTB file
  1015.  
  1016.                      Select this option to create a new Btrieve file.
  1017.                      You will need to supply the name of a
  1018.                      BTrieve Build file (BTB) and a name for the
  1019.                      new file.  This option is similar to  BUTIL's
  1020.                      -CREATE option, but with much better error
  1021.                      handling.  Please see the sample BTB file
  1022.                      called SAMPLE.BTB provided with BTFILER
  1023.                      system and listed in Appendix A.
  1024.  
  1025.                   f. Supplemental Index
  1026.  
  1027.                      Selecting this menu option will give you
  1028.                      another menu, where you may create or
  1029.                      drop a supplemental index.  You must
  1030.                      have a .BTS file (see SAMPLE.BTS for a
  1031.                      sample of the format).  Enter the .BTS
  1032.                      file name in the first field, and the
  1033.                      name of the Btrieve file to add the
  1034.                      supplemental index to in the next.
  1035.  
  1036.                      If you choose to drop a supplemental
  1037.                      index, you will be asked to supply the
  1038.                      Btrieve file name and the index number
  1039.                      to drop.  Use File/Misc. Btrieve
  1040.                      Functions/Statistics to determine the
  1041.                      key number to drop.
  1042.  
  1043.                   g. Transactions
  1044.  
  1045.                      You may begin a transaction, or if one
  1046.                      is already in progress, end a
  1047.                      transaction using this menu option.
  1048.                      When ending a transaction, you may
  1049.                      choose to simply end the transaction
  1050.                      (changes saved) or you may abandon the
  1051.                      transaction (changes lost).
  1052.  
  1053.          8. Exiting BTFILER
  1054.  
  1055.                Choose this option to exit BTFILER and return
  1056.                to DOS.  You may also exit by pressing ESC
  1057.                (or by pressing ESC twice if you are in the
  1058.                File, Options, or Help sub-menu).
  1059.  
  1060.  
  1061.        D. The Options Sub-menu
  1062.  
  1063.          1. Set Colors
  1064.  
  1065.                Choose from the four color sets mentioned.
  1066.  
  1067.          2. Set Misc. Parameters
  1068.  
  1069.                Choose this option and you will be presented
  1070.                with a screen that looks like this:
  1071.  
  1072.                   Set BTFILER Misc. Options
  1073.  
  1074.                               [_] Load Btrieve?
  1075.                               [_] Load Brequest?
  1076.  
  1077.         Browse/Edit Open Mode: ___________
  1078.  
  1079.          Btrieve load options: ________________________
  1080.  
  1081.         Brequest load options: ________________________
  1082.  
  1083.    Memory to save for Btrieve: ______
  1084.  
  1085.        Owner name for Btrieve: ____________________
  1086.  
  1087.       Largest variable record: _____
  1088.  
  1089.   Print report to (LPT1, etc): ________________________
  1090.  
  1091.       Default File Name Mask: _____________________________
  1092.            (i.e. "*.DAT")
  1093.  
  1094.                The first two questions ask if you would like
  1095.                to load Btrieve and/or Brequest.  It might be
  1096.                better (from a memory control standpoint) to
  1097.                have Btrieve loaded BEFORE you run BTFILER,
  1098.                but it is often convenient to allow BTFILER
  1099.                to load it for you.
  1100.  
  1101.                The next question allows you to determine the
  1102.                open mode when files are browsed or edited
  1103.                (using the File/Browse-Edit Btrieve File menu
  1104.                option).  If you wish to ensure that the file
  1105.                is not changed, set Read-Only.  If working on
  1106.                a network, and you wish to have exclusive
  1107.                access to a file, set Exclusive.  To verify
  1108.                data as it is written (normally not needed
  1109.                and not very effective in any case) set
  1110.                Verify.  If you are working on a file where
  1111.                you are starting fresh and have nothing to
  1112.                lose, you may want to set Accelerated.  Note
  1113.                that Accelerated has no effect on speed of
  1114.                reading the file, and will leave your file
  1115.                damaged if it is not closed properly.  This
  1116.                option is included for completeness, not
  1117.                because we recommend this option.  All
  1118.                options are presented to you on a menu.
  1119.  
  1120.                The next two questions allow you to specify
  1121.                Btrieve and/or Brequest start-up (load)
  1122.                options. Please see your Btrieve or Brequest
  1123.                manual for specifics.  Also, note that it is
  1124.                possible to give invalid load options to
  1125.                Btrieve that will prevent Btrieve from being
  1126.                loaded.  In that case, load Btrieve BEFORE
  1127.                you enter BTFILER and then correct the
  1128.                Btrieve load options.
  1129.  
  1130.                The amount of memory to save for Btrieve is
  1131.                dependent upon the version of Btrieve you are
  1132.                using, the load options you specify, and the
  1133.                availability of extended (or is that
  1134.                expanded...) memory.  Run Btrieve with the
  1135.                load parameters you expect to use and then
  1136.                run AMIMAP.EXE (a utility that reports on the
  1137.                space taken up by resident programs) and note
  1138.                how much space is taken up by Btrieve.  Add
  1139.                several thousand bytes to this for good luck,
  1140.                and this will reserve enough memory for
  1141.                Btrieve.  130000 is a safe number to use if
  1142.                this is too much for you to figure out.
  1143.  
  1144.                Owner name is the owner name to use when
  1145.                opening up Btrieve files that require an
  1146.                owner name.  If you don't know what this
  1147.                means, you probably don't need to fill this
  1148.                in.
  1149.  
  1150.                Largest variable record is important if you
  1151.                are going to read variable length record
  1152.                Btrieve files.  If you have too small a
  1153.                number here, you might get an error 22
  1154.                (buffer too short).  If you have too large a
  1155.                number here, you may have memory problems.
  1156.  
  1157.                Print report to specifies where reports
  1158.                (currently only the registration form and printing
  1159.                this documentation) should print.  This should
  1160.                almost always be LPT1 or PRN.  Try those if
  1161.                in doubt.
  1162.  
  1163.                The default file mask allows you to set the
  1164.                default file mask without having to enter it
  1165.                on the command line each time.  The default
  1166.                is "*.DAT", but for many "*.BTR" is more
  1167.                convenient.
  1168.  
  1169.          3. Reset Btrieve
  1170.  
  1171.                Issues a RESET command to Btreive.
  1172.  
  1173.          4. REGISTER BTFILER
  1174.  
  1175.                If you like what you see, and would like to
  1176.                make sure that shareware programs like
  1177.                BTFILER are produced, you must
  1178.                register and pay for the use of the program.
  1179.                The $29.00 requested (for a single copy) is a
  1180.                steal, and to further entice you, we even
  1181.                made up this neat utility to print out the
  1182.                registration form for you.  Simply fill in
  1183.                the requested information and the form will
  1184.                be printed.  Fill in the number of single
  1185.                user or site licenses, the size disks you
  1186.                wish to receive,and mail it to the address on
  1187.                the form.  You can always just jot down your
  1188.                name and address and mail that in with a
  1189.                notation that you are registering for
  1190.                BTFILER, but what the heck, that's what
  1191.                computers are for!
  1192.  
  1193.                If you need to use a credit card, you may
  1194.                register on-line on CompuServe.  Type GO SE at
  1195.                any prompt and you will go to Software
  1196.                Excitement's connect-charge free section.  Choose
  1197.                menu option 7 (*** Register Shareware Software
  1198.                ***), then option 2 (Order by Product Title).
  1199.                BTFILER will be listed on the first page or two.
  1200.                Enter the number to the left of BTFILER and
  1201.                supply the requested information.  Credit card
  1202.                orders may also be placed by phone at
  1203.                (1-800-444-5457).  If you have any questions
  1204.                ordering, please contact us at the phone number
  1205.                or CIS ID listed throughout the documentation and
  1206.                the program.
  1207.  
  1208.                If you register, you will get:
  1209.  
  1210.                         A copy of the latest version of the
  1211.                            BTFILER system.
  1212.                         A printed manual.
  1213.                         Notice of future upgrades.
  1214.                         Information on future products.
  1215.                         Support for a MINIMUM of 90 days.
  1216.                         A copy of our BU partial BUTIL
  1217.                            replacement program.
  1218.                            This program STOPs, RESETs Btrieve,
  1219.                            shows BTRIEVE version and CLONEs
  1220.                            Btrieve files.  You may distribute
  1221.                            this freely.
  1222.  
  1223.  
  1224.  
  1225.        E. The Help Sub-menu
  1226.  
  1227.          These options are self explanatory (and non-
  1228.          threatening if you just try them out).
  1229.  
  1230.          1. List Error Codes
  1231.  
  1232.          2. List Operation Codes
  1233.  
  1234.          3. Page Size Calculator - For the designer of Btrieve
  1235.             file databases, allows for the creation of files
  1236.             with the minimum amout of space wasted.
  1237.  
  1238.          3. About BTFILER
  1239.  
  1240. 5.  Getting help/making suggestions/future directions
  1241.  
  1242.      If you are a registered user, or if you are having a
  1243.      problem getting started, PLEASE contact us at:
  1244.  
  1245.                         Access Microsystems Inc.
  1246.                         404 Midstreams Road
  1247.                         Brick, NJ  08724-3838
  1248.  
  1249.                         (908) 892-2683
  1250.                         CIS: 74040,607
  1251.  
  1252.      We generally work 9 to 5, Monday through Friday.  We
  1253.      may not always be here when you call, but we will try
  1254.      to return calls if you leave a SPECIFIC message.  We
  1255.      monitor Compuserve (CIS) messages daily for support
  1256.      purposes, but understand that not everyone is ready for
  1257.      E-Mail.
  1258.  
  1259.      We seek your advice on future directions for this and
  1260.      other products.  We expect (if the interest in BTFILER
  1261.      warrants) a follow-on product that will add some more
  1262.      advanced editing, as well as more powerful utilities
  1263.      for doing things like importing and exporting data and
  1264.      creating files.  We would love your advice.
  1265.  
  1266.  
  1267.  
  1268.  
  1269.                   APPENDIX A - Listing of SAMPLE.BTB
  1270.  
  1271. The following is a listing of SAMPLE.BTB, An ASCII file that
  1272. describes a BTRIEVE file to be built with BTFILER's
  1273. File/Misc. Btrieve Functions/Create File from BTB file menu
  1274. option.  Please modify this file to create the type of file
  1275. YOU need.  Keep the BTB file you create on line to rebuild
  1276. the file you create as needed.
  1277.  
  1278. #
  1279. #       This line (and all lines beginning with '#') are COMMENTS.
  1280. #
  1281. #       This is a sample BTrieve Build (BTB) file.  It allows for the
  1282. #       creation of Btrieve files in BTFILER.  It does the same thing
  1283. #       as the BUTIL -CREATE function, but with one significant
  1284. #       difference:  Error diagnostics are clearer.  This removes (I
  1285. #       think) the most significant problem with the BUTIL -CREATE
  1286. #       process.  Someday an interactive create utility will be part
  1287. #       of BTFILER, but until then, this will have to do...
  1288. #
  1289. #       Case is not important, and some fields are optional (as
  1290. #       noted in comments).
  1291. #
  1292. #       These are the fields possible listed in order of appearance
  1293. #       in the file level settings section:
  1294. #
  1295. #               RECORD LEN=n
  1296. #               PAGE SIZE=n, multiple of 512
  1297. #               VARIABLE=<YES or NO>
  1298. #               BLANK TRUNCATION=<YES or NO>      OPTIONAL!
  1299. #               DATA COMPRESSION=<YES or NO>
  1300. #               FREE SPACE THRESHOLD=<10, 20 or 30>
  1301. #               ALTERNATE FILE=<filename>         OPTIONAL if no alternate key
  1302. #               INCLUDE DATA=<YES or NO>          OPTIONAL!
  1303. #               NUMBER OF KEYS=n
  1304. #
  1305. #
  1306. # These are file level settings, with more details...
  1307. #
  1308. RECORD LEN=131
  1309. #
  1310. # In the Help menu, see "Calculate Page Size" to find optimal size.
  1311. #
  1312. PAGE SIZE=1536
  1313. VARIABLE=NO
  1314. #
  1315. # BLANK TRUNCATION is only meaningful with variable length
  1316. #       records, so this BLANK TRUNCATION= line is optional.
  1317. #
  1318. BLANK TRUNCATION=NO
  1319. DATA COMPRESSION=NO
  1320. #
  1321. # FREE SPACE THRESHOLD=n, where 'n' is 10, 20 or 30 ONLY!
  1322. #
  1323. FREE SPACE THRESHOLD=20
  1324. #
  1325. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1326. #         UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1327. #         key segments exist.
  1328. #
  1329. ALTERNATE FILE=UPPER.ALT
  1330. #
  1331. #  INCLUDE DATA=<Y or N> is used to determine if the file is key only
  1332. #        Data only, or key and data.  INCLUDE DATA= line is OPTIONAL!
  1333. #
  1334. #  For KEY ONLY:   INCLUDE DATA=NO
  1335. #                  NUMBER OF KEYS=1
  1336. #  and key length is == to record length.
  1337. #
  1338. #  For DATA ONLY:  INCLUDE DATA=YES
  1339. #                  NUMBER OF KEYS=0
  1340. #
  1341. INCLUDE DATA=Yes
  1342. #
  1343. #  NUMBER OF KEYS= is used as a cross check of the segments
  1344. #       passed below.  In case of a conflict, the option is given
  1345. #       to accept the key count reflected in the segments, or
  1346. #       abandoning creation of the file.
  1347. #
  1348. NUMBER OF KEYS=2
  1349. #
  1350. #  END OF FILE LEVEL SETTINGS!
  1351. #
  1352. #  This marks the beginning of key segment level information.
  1353. #       If I were you, and I were creating BTB files, I would
  1354. #       place a large comment band between each key segment
  1355. #       to remind myself what I think I am doing.  Just a
  1356. #       thought...
  1357. #
  1358. #  The lines for each key segment are in the following order:
  1359. #
  1360. #       START=n, where 'n' is the starting position of the key
  1361. #       LEN=n, where 'n' is the length of the key
  1362. #       MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1363. #                        Allows Modifications to be made to the key?
  1364. #       DUPLICATES=s, ditto above...Allows Duplicate keys?
  1365. #       ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1366. #       DESCENDING=s, like above.  Sorts Hi to Lo?
  1367. #       TYPE=t, where 't' is EXACTLY one (case difference OK) of the following:
  1368. #
  1369. #               "String",
  1370. #               "Integer",
  1371. #               "Float",
  1372. #               "Date",
  1373. #               "Time",
  1374. #               "Decimal",
  1375. #               "Money",
  1376. #               "Logical",
  1377. #               "Numeric",
  1378. #               "Bfloat",
  1379. #               "Lstring",
  1380. #               "Zstring",
  1381. #               "Unsigned Binary",
  1382. #               "Autoincrement",
  1383. #
  1384. #       NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1385. #                  NULL=N/A to explicitly state no NULL value.
  1386. #                  NULL= is OPTIONAL.
  1387. #       SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1388. #                  segments with a SEGMENT=No value should be the same
  1389. #                  as the number of keys you declare.
  1390. #
  1391. #
  1392. #  Key 0/Segment 1
  1393. #
  1394. START=1
  1395. LEN=11
  1396. MODIFIABLE=n
  1397. DUPLICATES=n
  1398. ALTERNATE=n
  1399. DESCENDING=n
  1400. TYPE=STRING
  1401. NULL=N/A
  1402. SEGMENT=NO
  1403. #
  1404. #  key 1/segment 1
  1405. #
  1406. START=12
  1407. LEN=30
  1408. MODIFIABLE=y
  1409. DUPLICATES=y
  1410. ALTERNATE=y
  1411. DESCENDING=n
  1412. TYPE=STRING
  1413. NULL=N/A
  1414. SEGMENT=YES
  1415. #
  1416. #  key 1/segment 2
  1417. #
  1418. START=1
  1419. LEN=11
  1420. MODIFIABLE=y
  1421. DUPLICATES=y
  1422. ALTERNATE=y
  1423. DESCENDING=n
  1424. TYPE=STRING
  1425. NULL=N/A
  1426. SEGMENT=NO
  1427. #
  1428. #  That's all, folks!
  1429. #
  1430.       Appendix A - Listing of SAMPLE.BTB and SAMPLE.BTS
  1431.  
  1432.  
  1433. Use the following file (supplied on disk as well) that
  1434. allows you to create a Btrieve file by describing it in an
  1435. ASCII file.  Modify it for your needs and run the
  1436. File/Misc. Btrieve Functions/Create file using BTB file menu
  1437. option.  When asked, supply the name of the BTB file you
  1438. have modified for your use, or use the SAMPLE.BTB file to
  1439. see how the system works.
  1440.  
  1441. #
  1442. #       This line (and all lines beginning with '#') are COMMENTS.
  1443. #
  1444. #       This is a sample BTrieve Build (BTB) file.  It allows for the
  1445. #       creation of Btrieve files in BTFILER.  It does the same thing
  1446. #       as the BUTIL -CREATE function, but with one significant
  1447. #       difference:  Error diagnostics are clearer.  This removes (I
  1448. #       think) the most significant problem with the BUTIL - CREATE
  1449. #       process.  Someday an interactive create utility will be part
  1450. #       of BTFILER, but until then, this will have to do...
  1451. #
  1452. #       Case is not important, and some fields are optional (as
  1453. #       noted in comments).
  1454. #
  1455. #       These are the fields possible listed in order of appearance
  1456. #       in the file level settings section:
  1457. #
  1458. #               RECORD LEN=n
  1459. #               PAGE SIZE=n, multiple of 512
  1460. #               VARIABLE=<YES or NO>
  1461. #               BLANK TRUNCATION=<YES or NO>        OPTIONAL!
  1462. #               DATA COMPRESSION=<YES or NO>
  1463. #               FREE SPACE THRESHOLD=<10, 20 or 30>
  1464. #               ALTERNATE FILE=<filename>       OPTIONAL if no alternate key
  1465. #               INCLUDE DATA=<YES or NO>        OPTIONAL!
  1466. #               NUMBER OF KEYS=n
  1467. #
  1468. #
  1469. # These are file level settings, with more details...
  1470. #
  1471. RECORD LEN=131
  1472. #
  1473. # In the Help menu, see "Calculate Page Size" to find
  1474. optimal size.
  1475. #
  1476. PAGE SIZE=1536
  1477. VARIABLE=NO
  1478. #
  1479. # BLANK TRUNCATION is only meaningful with variable length
  1480. #       records, so this BLANK TRUNCATION= line is optional.
  1481. #
  1482. BLANK TRUNCATION=NO
  1483. DATA COMPRESSION=NO
  1484. #
  1485. # FREE SPACE THRESHOLD=n, where 'n' is 10, 20 or 30 ONLY!
  1486. #
  1487. FREE SPACE THRESHOLD=20
  1488. #
  1489. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1490. #         UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1491. #         key segments exist.
  1492. #
  1493. ALTERNATE FILE=UPPER.ALT
  1494. #
  1495. #  INCLUDE DATA=<Y or N> is used to determine if the file is key only
  1496. #         Data only, or key and data.  INCLUDE DATA= line is OPTIONAL!
  1497. #
  1498. #  For KEY ONLY:   INCLUDE DATA=NO
  1499. #                           NUMBER OF
  1500. KEYS=1
  1501. #  and key length is == to record length. #
  1502. #  For DATA ONLY:  INCLUDE
  1503. DATA=YES
  1504. #                           NUMBER OF KEYS=0
  1505. #
  1506. INCLUDE DATA=Yes
  1507. #
  1508. #  NUMBER OF KEYS= is used as a cross check of the segments
  1509. #       passed below.  In case of a conflict, the option is given
  1510. #       to accept the key count reflected in the segments, or
  1511. #       abandoning creation of the file.
  1512. #
  1513. NUMBER OF KEYS=2
  1514. #
  1515. #  END OF FILE LEVEL SETTINGS!
  1516. #
  1517. #  This marks the beginning of key segment level information.
  1518. #       If I were you, and I were creating BTB files, I would
  1519. #       place a large comment band between each key segment
  1520. #       to remind myself what I think I am doing.  Just a
  1521. #       thought...
  1522. #
  1523. #  The lines for each key segment are in the following order:
  1524. #
  1525. #       START=n, where 'n' is the starting position of the key
  1526. #       LEN=n, where 'n' is the length of the key
  1527. #       MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1528. #                        Allows Modifications to be made to the key?
  1529. #       DUPLICATES=s, ditto above...Allows Duplicate keys?
  1530. #       ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1531. #       DESCENDING=s, like above.  Sorts Hi to Lo?
  1532. #       MANUAL=s, like above.  Manual key?  OPTIONAL!
  1533. #       TYPE=t, where 't' is EXACTLY one (case difference OK) of the
  1534. #               following:
  1535. #
  1536. #               "String",
  1537. #               "Integer",
  1538. #               "Float",
  1539. #               "Date",
  1540. #               "Time",
  1541. #               "Decimal",
  1542. #               "Money",
  1543. #               "Logical",
  1544. #               "Numeric",
  1545. #               "Bfloat",
  1546. #               "Lstring",
  1547. #               "Zstring",
  1548. #               "Unsigned Binary",
  1549. #               "Autoincrement",
  1550. #
  1551. #       NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1552. #                  NULL=N/A to explicitly state no NULL value.
  1553. #                  NULL= is OPTIONAL.
  1554. #       SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1555. #                  segments with a SEGMENT=No value should be the same
  1556. #                  as the number of keys you declare.
  1557. #
  1558. #
  1559. #  Key 0/Segment 1
  1560. #
  1561. START=1
  1562. LEN=11
  1563. MODIFIABLE=n
  1564. DUPLICATES=n
  1565. ALTERNATE=n
  1566. DESCENDING=n
  1567. TYPE=STRING
  1568. NULL=N/A
  1569. SEGMENT=NO
  1570. #
  1571. #  key 1/segment 1
  1572. #
  1573. START=12
  1574. LEN=30
  1575. MODIFIABLE=y
  1576. DUPLICATES=y
  1577. ALTERNATE=y
  1578. DESCENDING=n
  1579. TYPE=STRING
  1580. NULL=N/A
  1581. SEGMENT=YES
  1582. #
  1583. #  key 1/segment 2
  1584. #
  1585. START=1
  1586. LEN=11
  1587. MODIFIABLE=y
  1588. DUPLICATES=y
  1589. ALTERNATE=y
  1590. DESCENDING=n
  1591. TYPE=STRING
  1592. NULL=N/A
  1593. SEGMENT=NO
  1594. #
  1595. #  That's all, folks!
  1596. #
  1597.  
  1598. Use the following file (supplied on disk as well) that
  1599. allows you to create a Supplemental Index for a Btrieve file
  1600. by describing it in an ASCII file.  Modify it for your needs
  1601. and run the File/Misc. Btrieve Functions/Supplemental
  1602. Index/Create menu option.  When asked, supply the name of
  1603. the BTS file you have modified for your use, or use the
  1604. SAMPLE.BTS file to see how the system works.
  1605.  
  1606. #
  1607. #   This line (and all lines beginning with '#') are COMMENTS.
  1608. #
  1609. #   This is a sample BTrieve Supplemental Index (BTS) file.
  1610. #   It allows for the creation of a supplemental index (key)
  1611. #   for Btrieve files in BTFILER.  It does the same thing
  1612. #   as the BUTIL -SINDEX function, but with one significant
  1613. #   difference:  Error diagnostics are clearer.  This removes (I
  1614. #   think) the most significant problem with the BUTIL - SINDEX
  1615. #   process.  Someday an interactive utility for this will be part
  1616. #   of BTFILER, but until then, this will have to do...
  1617. #
  1618. #   Case is not important, and some fields are optional (as
  1619. #   noted in comments).
  1620. #
  1621. #   This field is the only field possible on the file level section:
  1622. #
  1623. #      ALTERNATE FILE=<filename>           OPTIONAL if no alternate key
  1624. #
  1625. #
  1626. #
  1627. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1628. #     UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1629. #     key segments exist.
  1630. #
  1631. ALTERNATE FILE=UPPER.ALT
  1632. #
  1633. #  END OF FILE LEVEL SETTINGS!
  1634. #
  1635. #  This marks the beginning of key segment level information.
  1636. #     If I were you, and I were creating BTS files, I would
  1637. #     place a large comment band between each key segment
  1638. #     to remind myself what I think I am doing.  Just a
  1639. #     thought...
  1640. #
  1641. #  The lines for each key segment are in the following order:
  1642. #
  1643. #     START=n, where 'n' is the starting position of the key
  1644. #     LEN=n, where 'n' is the length of the key
  1645. #     MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1646. #                      Allows Modifications to be made to the key?
  1647. #     DUPLICATES=s, ditto above...Allows Duplicate keys?
  1648. #     ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1649. #     DESCENDING=s, like above.  Sorts Hi to Lo?
  1650. #     MANUAL=s, like above, Manual key?  OPTIONAL!
  1651. #     TYPE=t, where 't' is EXACTLY one (case difference OK) of the following:
  1652. #
  1653. #                           "String",
  1654. #                           "Integer",
  1655. #                           "Float",
  1656. #                           "Date",
  1657. #                           "Time",
  1658. #                           "Decimal",
  1659. #                           "Money",
  1660. #                           "Logical",
  1661. #                           "Numeric",
  1662. #                           "Bfloat",
  1663. #                           "Lstring",
  1664. #                           "Zstring",
  1665. #                           "Unsigned Binary",
  1666. #                           "Autoincrement",
  1667. #
  1668. #     NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1669. #                NULL=N/A to explicitly state no NULL value.
  1670. #                NULL= is OPTIONAL.
  1671. #     SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1672. #                segments with a SEGMENT=No value MUST be one in this case
  1673. #                since only a single supplemental index can be declared
  1674. #                at once.
  1675. #
  1676. #  Segment 1
  1677. #
  1678. START=1
  1679. LEN=22
  1680. MODIFIABLE=n
  1681. DUPLICATES=n
  1682. ALTERNATE=n
  1683. DESCENDING=n
  1684. TYPE=STRING
  1685. NULL=N/A
  1686. SEGMENT=NO
  1687. #
  1688. #  That's all, folks!
  1689. #
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.              Appendix B - Using Keystroke files
  1709.  
  1710.  
  1711. Beginning with Version 1.30, BTFILER allows for use of
  1712. keystroke files to automate some program functions.  What
  1713. must be in the file is every keystroke that is required to
  1714. run a particular operation.  The only exception is the
  1715. keystroke required to bypass the registration reminder
  1716. screen.  This screen is passed over if a keystroke file is
  1717. being played.
  1718.  
  1719. Most characters are self explanatory, but some special
  1720. characters may also be entered.  '!' is used where an enter
  1721. key would be played, and '#' substitutes for ESC.  Control
  1722. characters may be entered as the caret key ('^') followed by
  1723. the actual letter (i.e. 'C').  If the characters '^' 'C' are in
  1724. a keystroke file, and they are played back while in a data
  1725. entry field, they will clear the field.  It is easiest to
  1726. use the mnemonic characters (those highlighted on the menus)
  1727. to select options, and note currently there is a limit of
  1728. 200 characters that may be played back.  Below two batch
  1729. files are listed that create keystroke files on the fly and
  1730. then feed them to BTFILER.
  1731.  
  1732.                          BTCLONE.BAT
  1733.  
  1734. echo off
  1735. if '%1' == '' goto NO_PARMS
  1736. if '%2' == '' goto NO_PARMS
  1737. goto OK
  1738. :NO_PARMS
  1739. echo USAGE: BTCLONE existing_file new_clone_file
  1740. goto END
  1741. :OK
  1742. rem
  1743. rem 'C' to choose Clone on opening menu, %1 the Btrieve
  1744. file, '!' for ENTER,
  1745. rem    %2 the New file, '!' for enter, and '###' for ESC's.
  1746. rem
  1747. echo C%1!%2!### >btclone.txt
  1748. btfiler /k:btclone.txt
  1749. del btclone.txt
  1750. :END
  1751.  
  1752.  
  1753.                          BTRESET.BAT
  1754.  
  1755. echo off
  1756. rem
  1757. rem  '#' (ESC) to go to top menu bar, 'O' for Options,
  1758. rem  'E' for Reset Btrieve, and
  1759. rem     Lots of "#' (ESC) to get back out.
  1760. rem
  1761. echo #OE### >btreset.txt
  1762. btfiler /k:btreset.txt
  1763. del btreset.txt
  1764. :END
  1765.  
  1766.  
  1767.              Appendix C - .INX Description files for
  1768.              Comma-Delimited ASCII Import and Export
  1769.  
  1770.  
  1771. Beginning with Version 1.40, BTFILER allows for use of .INX
  1772. files to describe fields to be imported and exported in
  1773. Comma-delimited files.  The example below, for instance, only
  1774. exports or imports 6 fields, whereas the file might contain many
  1775. more fields.  It is almost certainly more useful to EXPORT a
  1776. partial file than it would be to IMPORT a partial file.  If you
  1777. have a need for importing and exporting from files for which you
  1778. already have .DDF files, check for our BTVIEWER program,
  1779. probably available by July, 1992, with the filename BTVUnn.ZIP,
  1780. where 'nn' is a version number.  If you have need for import and
  1781. export with .DDF files before that time, drop us a line or call
  1782. and we will see if you can get an early BETA version.
  1783.  
  1784.  
  1785. #
  1786. #  This line, and all lines beginning with '#' are comments
  1787. #
  1788. #  This file will allow you to import and export data from Btrieve
  1789. #  files in a variety of ways.  Since you define what fields are in
  1790. #  or should be written to the ASCII comma delimited file, you can
  1791. #  do some pretty neat stuff, like eliminating fields from data
  1792. #  files by exporting only what you really want and importing to a
  1793. #  new file the selected fields.
  1794. #
  1795. #  The format of the information for each field is as follows:
  1796. #
  1797. #  FIELD NAME=s
  1798. #  BTRIEVE START=n
  1799. #  BTRIEVE LEN=n
  1800. #  FIELD TYPE=s
  1801. #  ASCII LEN=n
  1802. #  ASCII DECIMALS=n
  1803. #
  1804. #  'FIELD NAME' is essentially a comment for now.
  1805. #
  1806. #  'BTRIEVE START' is the position within the Btrieve file where
  1807. #  this field is (or in the case of import, where the data should
  1808. #  go).  The first position in the file is 1.
  1809. #
  1810. #  'BTRIEVE LEN' is the length of the field in the Btrieve fle in
  1811. #  it's native format.  Note, for instance, that Btrieve DATE fields
  1812. #  are 4 bytes.
  1813. #
  1814. #  'FIELD TYPE' is one of the following:
  1815. #
  1816. #                              "String"
  1817. #                              "Integer"
  1818. #                              "Float"
  1819. #                              "Date"
  1820. #                              "Time"
  1821. #                              "Decimal"
  1822. #                              "Money"
  1823. #                              "Logical"
  1824. #                              "Numeric"
  1825. #                              "Bfloat"
  1826. #                              "Lstring"
  1827. #                              "Zstring"
  1828. #                              "Unsigned Binary"
  1829. #                              "Autoincrement"
  1830. #
  1831. #  NOTE:  Only meaningful for IMPORT is a fieldtype of IGNORE.  What this
  1832. #         does is ignore the field in the ASCII comma-delimited file.  This
  1833. #         allows you to import files that have fields that you do not wish
  1834. #         to import.
  1835. #
  1836. #  'ASCII LEN' is the length the field should take in the ASCII
  1837. #  file.
  1838. #
  1839. #  'ASCII DECIMALS' is only meaningful for numbers.  N/A if it does not apply.
  1840. #
  1841. #  The ASCII output file will look something like this:
  1842. #
  1843. #  "Jones      ","Bob        ","404 Midstreams Road","Brick","NJ",08724
  1844. #
  1845. #  In the above case, the first 5 fields might have been STRING fields,
  1846. #  and the last field might have been Numeric, Decimal, or Integer.
  1847. #
  1848. #  Field 1
  1849. #
  1850. FIELD NAME=POL-PO Num
  1851. BTRIEVE START=1
  1852. BTRIEVE LEN=6
  1853. FIELD TYPE=string
  1854. ASCII LEN=6
  1855. ASCII DECIMALS=N/A
  1856. #
  1857. #  Field 2
  1858. #
  1859. FIELD NAME=POL-Sequence
  1860. BTRIEVE START=7
  1861. BTRIEVE LEN=3
  1862. FIELD TYPE=string
  1863. ASCII LEN=3
  1864. ASCII DECIMALS=N/A
  1865. #
  1866. #  Field 3
  1867. #
  1868. FIELD NAME=POL-SKU
  1869. BTRIEVE START=10
  1870. BTRIEVE LEN=7
  1871. FIELD TYPE=string
  1872. ASCII LEN=7
  1873. ASCII DECIMALS=N/A
  1874. #
  1875. #  Field 4
  1876. #
  1877. FIELD NAME=POL-Unit Retail
  1878. BTRIEVE START=17
  1879. BTRIEVE LEN=5
  1880. FIELD TYPE=decimal
  1881. ASCII LEN=10
  1882. ASCII DECIMALS=2
  1883. #
  1884. #  Field 5
  1885. #
  1886. FIELD NAME=POL-Cost
  1887. BTRIEVE START=22
  1888. BTRIEVE LEN=5
  1889. FIELD TYPE=decimal
  1890. ASCII LEN=10
  1891. ASCII DECIMALS=2
  1892. #
  1893. #  Field 6
  1894. #
  1895. FIELD NAME=POL-Ord Qty
  1896. BTRIEVE START=93
  1897. BTRIEVE LEN=4
  1898. FIELD TYPE=decimal
  1899. ASCII LEN=10
  1900. ASCII DECIMALS=0
  1901. #
  1902. #  This is just a demo.  Lots of fields follow, we just
  1903. #     picked these to extract.  Note that field 6 is not
  1904. #     adjacent to field 5.  The order that the fields are
  1905. #     defined dictates their order in the export file, or
  1906. #     in the case of imports, the fields must be defined in
  1907. #     the order the fields appear in the import file.
  1908. #
  1909.